package com.sbj.dto.res;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * @author summer
 * @version 1.0
 * @date 2024/8/11 09:15
 */
@Data
@SearchBean(tables = "order_time o",autoMapTo = "o",orderBy = "o.createTime DESC")
public class OrderTimeRes implements Serializable {

    @DbField("o.id")
    private Integer id;

    @DbField("o.start_time")
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime startTime;

    @DbField("o.end_time")
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime endTime;

    @DbField("CASE WHEN o.state=0 THEN '是' ELSE '否' END")
    private String stateName;

    @DbField("o.state")
    private Integer state;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DbField("o.createTime")
    private LocalDateTime createTime;

    @DbField("o.deleted")
    private Integer deleted;

    @DbField("o.count_down")
    private Integer countDown;
}
